-- GENERATED SPELL FOR [Yggdras] --


function spell0_30014(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(40504,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30014', 580, 1)
end

function spell1_30014(pUnit, Event) --@Corrode Flesh,n/a--
pUnit:FullCastSpellOnTarget(57076,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30014', 17000, 1)
end

function spell2_30014(pUnit, Event) --@Jormungar Spawn,Self--
pUnit:FullCastSpellOnTarget(55859,pUnit)
pUnit:RegisterEvent('Sorts_30014', 30329, 1)
end

function Sorts_30014(pUnit, Event)
local choix_sorts_30014 = math.random(0, 2)
if choix_sorts_30014 == 0 then
pUnit:RegisterEvent('spell0_30014', 1, 1)
end
if choix_sorts_30014 == 1 then
pUnit:RegisterEvent('spell1_30014', 1, 1)
end
if choix_sorts_30014 == 2 then
pUnit:RegisterEvent('spell2_30014', 1, 1)
end
end

function mob30014_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30014', math.random(1500, 3000), 1)
end

function mob30014_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30014_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30014_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30014, 1, 'mob30014_Action')
RegisterUnitEvent(30014, 2, 'mob30014_Leave')
RegisterUnitEvent(30014, 3, 'mob30014_Kill')
RegisterUnitEvent(30014, 4, 'mob30014_Die')
